package com.ruoyi.common.enums;

/**
 * @author Fei.Cong
 * @date 2024-07-23 9:02
 */
public enum LetterStatus {

    WAIT_CLAIM("1", "待认领"),
    CLAIM_SUCCESS("2", "认领成功"),
    DISPATCH_SUCCESS("3", "调度成功"),
    BACK("4", "退回"),
    ;

    private final String code;
    private final String desc;

    LetterStatus(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static LetterStatus getCode(Integer code) {
        for (LetterStatus type : values()) {
            if (type.code.equals(code)) {
                return type;
            }
        }
        return null;
    }
}
